class ChatGroupEntity {
  ChatGroupEntity({
    this.type,
    this.event,
    this.params,
  });

  ChatGroupEntity.fromJson(dynamic json) {
    type = json['type'];
    event = json['event'];
    params = json['params'] != null ? Params.fromJson(json['params']) : null;
  }

  String? type;
  String? event;
  Params? params;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['type'] = type;
    map['event'] = event;
    if (params != null) {
      map['params'] = params?.toJson();
    }
    return map;
  }
}

class Params {
  Params({
    this.id,
    this.userId,
    this.userName,
    this.fromType,
    this.fromId,
  });

  Params.fromJson(dynamic json) {
    id = json['id'];
    userId = json['user_id'];
    userName = json['user_name'];
    fromType = json['from_type'];
    fromId = json['from_id'];
  }
  String? id;
  String? userId;
  String? userName;
  String? fromType;
  String? fromId;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = id;
    map['user_id'] = userId;
    map['user_name'] = userName;
    map['from_type'] = fromType;
    map['from_id'] = fromId;
    return map;
  }
}
